package com.example.spring;

import com.example.spring.bean.Person;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * ClassName:testPerson
 * Package:com.example.spring
 * Description:
 *
 * @Author:ZhangXin
 * @Create:2023/5/8-16:08
 * @Version:v1.0
 */
//List和Set注入
public class testPerson {
    @Test
    public void name() {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("spring-collection.xml");
        Person person = applicationContext.getBean("person", Person.class);
        System.out.println(person);
    }
}
